package com.xms.schema.service.entity;

import com.xms.datacore.service.IDeleterService;
import com.xms.dependency.XmsDependencyException;
import com.xms.schema.entity.Entity;

import java.sql.SQLException;
import java.util.Collection;
import java.util.UUID;

/**
 * <p>
 * IEntityDeleterService
 * </p>
 *
 * @author migo
 * @since 2021/9/2
 */
public interface IEntityDeleterService extends IDeleterService<Entity> {

    boolean deleteById(UUID id, boolean dropTable) throws SQLException, XmsDependencyException;

    boolean deleteByIds(Collection<UUID> idList, boolean dropTable) throws SQLException, XmsDependencyException;

    boolean deleteByName(String name) throws SQLException, XmsDependencyException;

    boolean deleteByName(String name, boolean dropTable) throws SQLException, XmsDependencyException;

    boolean delete(Entity deleted, boolean dropTable) throws SQLException, XmsDependencyException;

    boolean delete(Entity deleted) throws SQLException, XmsDependencyException;
}
